package com.qf.work20250111;

/**
 * @author zdl
 * @date 2025/1/11
 */
public class Person {
    String name;
   private int age;

    public Person() {

    }

    public Person(String name) {
        this.name = name;
    }

    public Person(String name, int age) {
        this.name = name;
        this.age = age;
    }
    public void eat(){
        System.out.println("吃饭！！！");
    }
    public void eat(String name){
        System.out.println(name +"吃饭!");
    }
    public void eat(String name, int age){
        System.out.println(name +"吃饭!"+age+"岁了");
    }

    @Override
    public String toString() {
        return "Person{" +
                "name='" + name + '\'' +
                ", age=" + age +
                '}';
    }
}
